const Mock = require('mockjs')
const fs = require('fs')

const data = Mock.mock({
    'list|10': [
        {
            'title': '@name(2,3)',
            'age|10-100': 1,
            'word': '@title(2)',
            'id': '@id',
            'flag': false
        }
    ]
})

fs.writeFileSync('./data2.json', JSON.stringify(data.list))